home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / MISC.SWG / 0013_REBOOT2.PAS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  759b  |  33 lines

  1. {
  2. KARIM SULTAN
  3.  
  4. Believe it or not,  Int 19h is not he way to go.  It will stimulate a warm
  5. boot, but it is not very safe.  It doesn't do some of the shutdown work
  6. necessary For some applications, and the preferred method is to set the Word
  7. at location 40:72 and to jump to $FFFF:0.
  8. Here are my Procedures For doing reboots from a Program:
  9. }
  10. Procedure ColdBoot;  Assembler;
  11. Asm
  12.   Xor  AX, AX
  13.   Mov  ES, AX
  14.   Mov  Word PTR ES:[472h],0000h   {This is not a WARM boot}
  15.   Mov  AX, 0F000h
  16.   Push AX
  17.   Mov  AX, 0FFF0h
  18.   Push AX
  19.   Retf
  20. end;
  21.  
  22. Procedure WarmBoot;  Assembler;
  23. Asm
  24.   Xor  AX, AX
  25.   Mov  ES, AX
  26.   Mov  Word PTR ES:[472h],1234h   {This is not a COLD boot}
  27.   Mov  AX, 0F000h
  28.   Push AX
  29.   Mov  AX, 0FFF0h
  30.   Push AX
  31.   Retf
  32. end;
  33.